package com.centit.suixuan.puremvc.view
{
	import com.centit.suixuan.puremvc.model.MenuProxy;
	import com.centit.suixuan.puremvc.model.User;
	import com.centit.suixuan.puremvc.model.UserProxy;
	
	import flash.events.MouseEvent;
	
	import mx.controls.Alert;
	import mx.controls.Tree;
	import mx.events.DividerEvent;
	
	import org.osmf.containers.MediaContainer;
	import org.osmf.layout.LayoutMetadata;
	import org.osmf.layout.LayoutRendererBase;
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	
	import spark.components.Button;
	import spark.components.Panel;
	
	public class ImageMediator extends Mediator implements IMediator
	{
		public static const NAME:String = "ImageMediator";
		public static const PREV_CLICK:String = "PrevClick";
		public static const NEXT_CLICK:String = "NextClick";
		
		
		public function ImageMediator(mediatorName:String=null, viewComponent:Object=null)
		{
			super(mediatorName, viewComponent);
			
			
			
			(viewComponent as ImagePanel).btnPrev.addEventListener(MouseEvent.CLICK, prevClick);
			(viewComponent as ImagePanel).btnNext.addEventListener(MouseEvent.CLICK, nextClick);
			
			
			
			(viewComponent as ImagePanel).img.source = "http://img3.cache.netease.com/photo/0001/2012-09-13/100x75_8B9D5ICC00AO0001.jpg";
			
			
		}
		
		override public function handleNotification(notification:INotification):void
		{
			var obj : Object = notification.getBody();
			
			switch(notification.getName()){
				case PREV_CLICK : break;
				case NEXT_CLICK : break;
				default : break;
			}
		}
		
		override public function listNotificationInterests():Array
		{
			return [
				PREV_CLICK,
				NEXT_CLICK,
			];
		}
		
		
		
		private function prevClick(e : MouseEvent) : void {
			
		}
		private function nextClick(e : MouseEvent) : void {
			
		}
		
		
	}
}